{include file="admin/header.html} 
<div class="title">
    <h3>新闻管理</h3>
</div>

<div class="condition">
    <form action="/admin/news" method="get">
        类型:<select name="type">
            <option value="">所有</option>
            {foreach from=$show_types item=v}
            <option value="{$v}">{$v}</option>
            {/foreach}
        </select>
        关键字:<input name="key" value="">
        <input type="submit" value="筛选"/>
        <a href="/admin/addnews" style="float: right">添加新闻</a>
    </form>
</div>
<div class="table_zone">
    <table>
        <tr>
            <th>编号</th><th>类型</th><th>标题</th><th>内容</th><th>编辑者</th><th>备注</th><th>创建时间</th>            
        </tr>
        {foreach from=$news item=v key=k}
        <tr {if $k%2 == 0}style="background-color:#EEE"{/if}>
            <td><a href="/admin/editnews?newsid={$v.newsid}">{$v.newsid}</a></td><td>{$v.newstype}</td><td>{$v.title}</td>
            <td><a href="{$v.link}" target="_blank">查看</a></td>
            <td>{$v.userid}</td><td>{$v.remark}</td><td>{$v.createtime}</td>
        </tr>
        {/foreach}
    </table>
    <div class="paging">{$paging}</div>
</div>
{literal}
{/literal}
{include file="admin/footer.html"}